#pragma once
#include "config.h"
#include <vector>

class Presenter;

class IView {
public:

  // Constructor
  IView() {}

  IView(Presenter* presenter);

  virtual ~IView() {}
  virtual int Init() { return 1; }
  virtual void Render() {}
  virtual void AddView() {}
  virtual void RemoveView() {}
  virtual void Update(int Event) {}

  void RaiseEvent();

  virtual void SignalError(std::string errormsg) {}

  void set_presenter(Presenter *presenter);

  Presenter* presenter() {
    return presenter_;
  }

private:
  Presenter* presenter_;

};